package org.third.spring.boot.hello.domain;

import org.hibernate.annotations.GenericGenerator;
import org.third.common.domain.entity.DeploymentStatus;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.util.Date;

@Entity
@Table(name = "HellUser")
public class HelloUser extends PersistObject {

	// @javax.persistence.GeneratedValue(generator = "system-uuid")
	// @org.hibernate.annotations.GenericGenerator(name = "system-uuid", strategy = "uuid")
	// @Column(name = UNIQUE_ID_COLUMN_NAME, unique = true, nullable = false)
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private Long id;

	@Column(name = "uuid", nullable = false, length = 50, unique = true)
	private String uuid;

	@Column(name = "deployment_status", nullable = false)
	@Enumerated(EnumType.STRING)
	private DeploymentStatus status;

	@Column(name = "create_time", nullable = false, updatable = false)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;

	@Column(name = "update_time")
	@Temporal(TemporalType.TIMESTAMP)
	private Date updatedTime;

	@Column(name = "updates", nullable = false)
	private Long updates;

	public HelloUser(String name) {
		super(name);
	}

	public HelloUser() {
		super();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public DeploymentStatus getStatus() {
		return status;
	}

	public void setStatus(DeploymentStatus status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdatedTime() {
		return updatedTime;
	}

	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}

	public Long getUpdates() {
		return updates;
	}

	public void setUpdates(Long updates) {
		this.updates = updates;
	}

}
